<?php
	require_once("functions.php");
	require_once("../Security/settings.php");
	if (SHOW_SYSTEMFILES == false){
		require_once("../Security/restrictions.php");
	}
	
	if(file_exists("../Languages/".USE_LANG."/")){
		$language = simplexml_load_file("../Languages/".USE_LANG."/strings.xml");
	}
	
	require_once("../Security/master_restrictions.php");
	$file = $_GET["file"];
	$dateiname = basename($file);
	$compl = path_compl($file);
	if (!is_restricted($compl)){
		header('Content-type: application/download');
		header('Content-Disposition: attachment; filename="'.$dateiname.'"');
		readfile("../../".$file);
	} else {
		echo $language->errors->value_3;
	}
?>